<!-- 异步加载组件 -->
<template>
    <div v-for="(item, index) in list" :key="index">
        {{ item.name }}
    </div>
</template>

<script setup lang='ts'>

import { axios } from './server'

// const a = async () => {
//     await axios('/data.json')
// }

const list = await axios('/data.json')

console.log(list)

</script>
<style lang='less' scoped>
</style>